package cn.cs.client;

import cn.cs.config.CsConfiguration;
import cn.cs.fallback.UserInformationWebFallBack;
import cn.cs.fallback.UserRepairApplyFallBack;
import cn.cs.pojo.AppOrder;
import cn.cs.pojo.UserInformationWeb;
import cn.cs.pojo.UserRepairApply;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * Created by yuexl
 */
@FeignClient(name = "cs-user-provider", configuration = CsConfiguration.class, fallback = UserRepairApplyFallBack.class)
public interface UserRepairApplyClient {


    @RequestMapping(value = "/getUserRepairApplyById", method = RequestMethod.POST)
    public UserRepairApply getUserRepairApplyById(@RequestParam("id") String id) throws Exception;

    @RequestMapping(value = "/getUserRepairApplyListByMap", method = RequestMethod.POST)
    public List<UserRepairApply> getUserRepairApplyListByMap(@RequestBody Map<String, Object> param) throws Exception;

    @RequestMapping(value = "/getUserRepairApplyCountByMap", method = RequestMethod.POST)
    public Integer getUserRepairApplyCountByMap(@RequestBody Map<String, Object> param) throws Exception;

    @RequestMapping(value = "/insertUserRepairApply", method = RequestMethod.POST)
    public Integer insertUserRepairApply(@RequestBody UserRepairApply userRepairApply) throws Exception;

    @RequestMapping(value = "/updateUserRepairApply", method = RequestMethod.POST)
    public Integer updateUserRepairApply(@RequestBody UserRepairApply userRepairApply) throws Exception;

    @RequestMapping(value = "/deleteUserRepairApplyById", method = RequestMethod.POST)
    public Integer deleteUserRepairApplyById(@RequestParam("id") String id) throws Exception;

    @RequestMapping(value = "/getRepairUserByAreaIdOnlyWork", method = RequestMethod.POST)
    public List<Map<String, Object>> getRepairUserByAreaIdOnlyWork(@RequestParam("area") String area)throws Exception;

}

